home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_2
/
rnet107u.zip
/
PCBLOGIN.SLT
< prev
next >
Wrap
Text File
|
1991-01-03
|
9KB
|
248 lines
// ------------------------------------------------------------------------- //
//
// PCBoard Login Script -- Handles Lang, Graphics, login name, password.
// Processes until main board command. Will "register" if not current.
// Automatically goes into a specified door from PCBoard/ProLogon.
//
// Modification of track values may be needed to properly handle
// modified prompts if the host sysop has used that option.
//
// Compile with CS PCBLOGIN which will produce PCBLOGIN.SLC.
// Add PCBLOGIN for autoscript entry in your telix dialing directory.
//
// 10-31-1988 Added newuser processing
// 07-16-1989 Added ProLogin support and ProLogon quick logon
// 01-17-1990 Added pop-up windows
//
// Robert Vostreys, FTL Sysop, 404-292-8761, 404-299-3930 HST
//
// ------------------------------------------------------------------------- //
//
// Edit the string entries below to reflect the login needed for echomail.
//
// Set the pro_door[] and first_cmd[] strings to point to the mail door.
//
// Compile (CS PCBLOGIN) and place this as the autoscript in your Telix
// dialing directory entries used for netmail. If you use a different login
// for yourself vs echomail (suggested), you may want to rename this script
// to something else so you use PCBLOGIN for your own login and perhaps
// NETLOGIN for echomail login since the username is different.
//
// I recommend using different dialing directory entries for personal and
// echomail logins, so the "autoscript" can be different (PCBLOGIN vs
// NETLOGIN).
//
// ------------------------------------------------------------------------- //
str user_name[] = "FTL MAILRUN";
str city_state[] = "Robert Vostreys - Atlanta";
str data_phone[] = "404-292-8761";
str home_phone[] = "404-299-3930";
str unknown_pw[] = "NEWPASSWORD"; // used if entry not in dialing directory
str cpu_type[] = "C&T 386/25";
str graphicsYN[] = "Y"; // do you want graphics or non? (Y/N)
str pro_door[] = "3"; // door to open if logging into ProLogon
str first_cmd[] = "DOOR;3"; // door (first command) if in PCBoard
// ------------------------------------------------------------------------- //
main()
{
int stat = 0;
int flag = 0;
int t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15;
int t99 = 0;
int pcblogin = 0;
int endflag = 0;
t1 = track(" graphics", 1); // ANSI Graphics Prompt
t2 = track("first name?", 1); // Name Prompt (put FN;LN^MPW)
t3 = track("Language #", 1); // Language Prompt (1=English?)
t4 = track("(H)elp, More?", 1); // Y/N/NS More prompt
t5 = track("continue", 1); // Press (ENTER) to continue
t6 = track("(Enter)=yes?", 1); // Scan messagebase (Y/N/A NS)
t7 = track("Command?", 1); // Main Board Command?
t8 = track("Conference memb", 1); // View Conference Members
t9 = track("as a new user?", 1); // OOPS! New user here!
t10 = track("word please!)?", 1); // Enter PASSWORD
t11 = track("City and State", 1); // City and State
t12 = track("DOOR #", 1); // ProLogin command prompt
t13 = track("Re-enter password", 1); // Verify new password login
t14 = track("(Dots will echo)", 1); // Actual Password Prompt
t15 = track("ProLogon"); // Look for ProLogin system
// ------------------------------------------------------------------------- //
t99 = timer_start(200); // No response for 20 seconds
while (carrier() and endflag == 0)
{
terminal();
stat = track_hit(0); // see if any flags set
if (stat) // reset timer when track hits
{
timer_restart(t99, 200);
}
if (time_up(t99))
{
status_wind("WAKEUP!", 1);
cputs("^M");
timer_free(t99);
t99 = timer_start(200);
terminal();
}
if (stat == 15)
{
track_free(t3);
t3 = track("(0)=no");
pcblogin = 1;
}
else if (stat == t3) // request language
cputs("1^M");
else if (stat == t1) // ANSI graphics request
{
if (pcblogin == 0)
{
cputs(graphicsYN);
cputs(" Q NS^M");
terminal();
}
else // ProLogon quick login
{
track_free(t4);
t4 = track("(N)",1);
cputs(graphicsYN);
cputs(" Q ");
cputs(user_name);
cputs(" ");
cputs(_entry_pass);
cputs(" ");
cputs(pro_door);
cputs(" NS^M");
terminal();
endflag = 1;
status_wind("Login sequence completed...", 10);
}
}
else if (stat == t2) // send Login Name
{
if (pcblogin == 0)
{
capture("*CLOSE*");
cputs(user_name); cputs("^M");
}
if (pcblogin == 1) // ProLogon quick login 2nd try
{
capture("*CLOSE*");
track_free(t4);
t4 = track("(N)",1);
cputs(user_name);
cputs(" ");
cputs(_entry_pass);
cputs(" ");
cputs(pro_door);
cputs(" NS^M");
terminal();
cputs("^M");
endflag = 1;
status_wind("Login sequence completed...", 10);
}
}
else if (stat == t4) // don't want any "more"
cputs("No_More^M");
else if (stat == t5) // "Enter" to continue
cputs("^M");
else if (stat == t6 || stat == t8) // No, don't show messages
{ // Yes, we want to register
if (flag == 0) // Also, no conf member scan
cputs("NoScan^M");
else
{
capture("*CLOSE*");
cputs("Yes^M");
flag = 0;
}
}
else if (stat == t7 or stat == t12) // Login Compleated
{
if (pcblogin == 0)
{
cputs(first_cmd);
cputs("^M");
terminal();
status_wind("Login sequence completed...", 10);
endflag = 1;
}
if (pcblogin == 1)
{
cputs(pro_door);
cputs("^M");
terminal();
status_wind("Login sequence completed...", 10);
endflag = 1;
}
}
else if (stat == t9) // New User Login (Continue)
{
capture ("NEWLOGIN.CAP");
cputs("C^M");
flag = 1;
}
else if (stat == t10 || stat == t13 || stat == 14)
{
Go_Password(); // Password Entry / Verify / Go
track_free(t14); // don't allow the main password
} // request to reoccur.
else if (stat == t11) // City/State Prompt
{
status_wind("NEW USER LOGIN!!", 20);
cputs(city_state);
cputs("^M");
cputs(data_phone); // also put dataphone
cputs("^M");
cputs(home_phone); // also put homephone
cputs("^M");
cputs(cpu_type); // also put cputype
cputs("^M");
}
}
capture ("*CLOSE*"); // Close any open captures
timer_free(t99); // Clear all timer channels
track_free(0); // Clear all track channels
return(0); // Exit this login script.
}
// ------------------------------------------------------------------------- //
Go_Password()
{
if (strlen(_entry_pass) < 2)
{
cputs(unknown_pw);
cputs(itos(_entry_num));
}
else
cputs(_entry_pass);
cputs("^M");
}
// ------------------------------------------------------------------------- //